package com.liang.pcc.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalTime;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 设备功率数据表
 */
@TableName(value ="power_data")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PowerData {

    /**
     * 唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 外键关联设备
     */
    @TableField(value = "device_id")
    private Long deviceId;

    /**
     * 设备/线路名称
     */
    @TableField(value = "config_name")
    private String configName;

    /**
     * 时间槽
     */
    @TableField(value = "time_slot")
    private LocalTime timeSlot;

    /**
     * 功率值
     */
    @TableField(value = "power_value")
    private BigDecimal powerValue;

    /**
     * 数据写入时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 关联Excel文件
     */
    @TableField(value = "file_id")
    private Long fileId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;
}